// 订单相关数据api
import request from '@/utils/request'

// 用户产品
export function getPrice(data = {}) {
  return request({
    url: 'price/getUserPrice',
    method: 'post',
    data
  })
}


// 手机号查询
export function getiphoneOrder(data = {}) {
  return request({
    url: `submitApi/getOrder/${data}`,
    method: 'get',
    data
  })
}


// 用户产品
export function apiScopeCount(data = {}) {
  return request({
    url: 'submitApi/apiScopeCount',
    method: 'post',
    data
  })
}
// 订单详情查询
export function orderQuery(data = {}) {
  return request({
    url: 'submitApi/orderQuery',
    method: 'post',
    data
  })
}

//省份查询
// export function getScope(data = {}) {
//   return request({
//     url: 'shll/getScope',
//     method: 'post',
//     data
//   })
// }

// 首页余额
export function balance(username) {
  return request({
    url: `user/balance/${username}`,
    method: 'post'
  })
}
// 修改密码
export function changePwd(data = {}) {
  return request({
    url: 'user/changePwd',
    method: 'post',
    data
  })
}
// 总量查询
export function getVersion3(data = {}) {
  return request({
    url: 'bill/getVersion4',
    method: 'post',
    data
  })
}
// 消费金额
export function consume(day = 0) {
  return request({
    url: `submitApi/consume/${day}`,
    method: 'post'
  })
}
export function consumes(data = {}) {
  return request({
    url: `submitApi/consumes`,
    method: 'post',
    data
  })
}
// 消费金额
export function getBill(data = {}) {
  return request({
    url: "submitApi/getBill",
    method: 'post',
    data
  })
}
//账单邮箱发送
// export function getMail(data = {}) {
//   return request({
//     url: "submitApi/getMail",
//     method: 'post',
//     data
//   })
// }


// 上传图片
export function addExamine(data) {
  return request({
    url: `examine/addExamine`,
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
// 审核状态
export function updateExamine(data = {}) {
  return request({
    url: "examine/updateExamine",
    method: 'post',
    data
  })
}
//充值审核

export function getExamine(data = {}) {
  return request({
    url: `examine/getExamine`,
    method: 'post',
    data
  })
}
//获取用户名

export function getUsername() {
  return request({
    url: `user/getUsername`,
    method: 'post'
  })
}
// 充值记录
export function UserBill(data = {}) {
  return request({
    url: "bill/UserBill",
    method: 'post',
    data
  })
}

export function getUserPrice(data) {
  return request({
    url: '/price/getUserPrice',
    method: 'post',
    data
  })
}

export function charge(data) {
  return request({
    url: '/shll/charge',
    method: 'post',
    data
  })
}

export function charges(data) {
  return request({
    url: '/shll/charges',
    method: 'post',
    data
  })
}
// 订单回执错误
export function getBack(data) {
  return request({
    url: '/submitApi/getBack',
    method: 'post',
    data
  })
}
// 订单回执成功
export function getBacksuccessOrder(data) {
  return request({
    url: `/submitApi/successOrder?${data}`,
    method: 'get',
  })
}
// 订单回执错误
export function getBackerrorOrder(data) {
  return request({
    url: `/submitApi/errorOrder?${data}`,
    method: 'get',
  })
}




//生成卡密
export function addCamille(data) {
  return request({
    url: '/camille/addCamille',
    method: 'post',
    data
  })
}
//查询卡密
export function getCamille(data = {}) {
  return request({
    url: '/camille/getCamille',
    method: 'post',
    data
  })
}
//修改卡密
export function updateCamille(data) {
  return request({
    url: '/camille/updateCamille',
    method: 'post',
    data
  })
}
//流量卡密短信发送
export function send(data) {
  return request({
    url: `camille/send`,
    method: 'post',
    data
  })
}
export function balanceDetailed(data={}) {
  return request({
    url: '/submitApi/balanceDetailed',
    method: 'post',
    data
  })
}